﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using QuanLyThuoc.DAL;
namespace QuanLyThuoc.BUS
{
    class ToaThuocBUS
    {
        private static readonly ToaThuocDAL toa = new ToaThuocDAL();
        public static DataTable SelectAll_ToaThuoc()
        {
            return toa.SelectAll_ToaThuoc();

        }
        public static DataTable LayIDToaThuoc()
        {
            string sql = @"select IDToa,IDBN,TenBN from tbToaThuoc order by IDToa";
            return toa.GetDataTable(sql);
        }
        public static DataTable SearchToaCondition(string keyword)
        {
            return toa.SearchToaCondition(keyword);
        }
        public static DataTable DemSoLuong_ToaThuoc()
        {
            return toa.DemSoLuong_ToaThuoc();
        }
        public static DataTable SelectID_ToaThuoc(string IDToa)
        {
            return toa.SelectID_ToaThuoc(IDToa);
        }
        public static int InsertToaThuoc(string IdToa, int IDThuoc,int IDBN, string HoTen, string NamSinh, string Gioi, string DiaChi, string SoDT, string ChanDoan, int SoNgayUong, string NgayTK)
        {
            return toa.InsertToaThuoc(IdToa, IDThuoc, IDBN, HoTen, NamSinh, Gioi, DiaChi, SoDT, ChanDoan, SoNgayUong, NgayTK);
        }
        public static int UpdateToaThuoc(string IdToa, int IDBN, int IDThuoc, string HoTen, string NamSinh, string Gioi, string DiaChi, string SoDT, string ChanDoan, int SoNgayUong, string NgayTK)
        {
             return toa.UpdateToaThuoc(IdToa, IDBN, IDThuoc, HoTen, NamSinh, Gioi, DiaChi, SoDT, ChanDoan, SoNgayUong, NgayTK);
        }
        public static int Delete_ToaThuoc(string IDToa)
        {
            return toa.Delete_ToaThuoc(IDToa);
        }
    }
}
